#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	string s, t;
	cin >> s >> t;
	int ans = 0;
	for (int i = 0; i < s.size() - 1; i++) {
		if (s[i] != t[i]) {
			ans++;
			s[i] = s[i] == '*' ? 'o' : '*';
			s[i + 1] = s[i + 1] == '*' ? 'o' : '*';
		}
	}
	for (int i = s.size() - 1; i > 0; i--) {
		if (s[i] != t[i]) {
			ans++;
			s[i] = s[i] == '*' ? 'o' : '*';
			s[i - 1] = s[i - 1] == '*' ? 'o' : '*';
		}
	}
	cout << ans;
	return 0;
}
